// // ###第一种写法
// // import XtxButton from './Button/index.vue'
// // import XtxSkeleton from './Skeleton/Skeleton.vue'

// //###第二种写法
// import Button from './Button/index.vue'
// import Skeleton from './Skeleton/Skeleton.vue'

// const XtxButton = Button
// const XtxSkeleton = Skeleton

// // export { XtxButton, XtxSkeleton }

// export const XtxUI = {
//   install(app) {
//     app.component('XtxButton', XtxButton)
//     app.component('XtxSkeleton', XtxSkeleton)
//   },
// }

// export default XtxUI

import XtxSkeleton from './Skeleton/Skeleton.vue'
import XtxSlider from './Slider/index.vue'
import XtxMore from './More/index.vue'
import XtxBread from './Bread/index.vue'
import XtxBreadItem from './Bread/Item.vue'
import XtxCity from './City/index.vue'
import XtxCount from './Count/index.vue'
import XtxButton from './Button/index.vue'
import XtxCheckBox from './CheckBox/index.vue'
import XtxImageView from './ImageView/index.vue'
import XtxSku from './Sku/index.vue'
import XtxDialog from './Dialog/index.vue'
import XtxInfiniteLoad from './InfiniteLoad/index.vue'
import XtxTabs from './Tabs/index.vue'
import XtxTabPane from './Tabs/pane.vue'
import type { App } from 'vue'

export {
  XtxSkeleton,
  XtxSlider,
  XtxMore,
  XtxBread,
  XtxBreadItem,
  XtxCity,
  XtxCount,
  XtxButton,
  XtxCheckBox,
  XtxImageView,
  XtxSku,
  XtxDialog,
  XtxInfiniteLoad,
  XtxTabs,
  XtxTabPane,
}

// app.use(XtxUI)的时候，就是调用了插件的 install 方法，并且传递了 app 实例过来
// 所以可以完成组件全局注册，添加全局指令等功能
const XtxUI = {
  install(app: App) {
    app.component(`XtxSkeleton`, XtxSkeleton)
    app.component(`XtxSlider`, XtxSlider)
    app.component(`XtxMore`, XtxMore)
    app.component(`XtxBread`, XtxBread)
    app.component(`XtxBreadItem`, XtxBreadItem)
    app.component(`XtxImageView`, XtxImageView)
    app.component(`XtxCity`, XtxCity)
    app.component(`XtxSku`, XtxSku)
    app.component(`XtxCount`, XtxCount)
    app.component(`XtxButton`, XtxButton)
    app.component(`XtxCheckBox`, XtxCheckBox)
    app.component(`XtxDialog`, XtxDialog)
    app.component(`XtxTabs`, XtxTabs)
    app.component(`XtxTabPane`, XtxTabPane)
    app.component(`XtxInfiniteLoad`, XtxInfiniteLoad)
  },
}

export default XtxUI
